package com.bjsxt.controller;

import com.bjsxt.pojo.Company;
import com.bjsxt.pojo.PageA;
import com.bjsxt.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/company")
public class CompanyController {
    @Autowired
    private CompanyService companyService;

    //根据条件查询公司
    @RequestMapping("/findMoreCompany")
    public PageA<Company> findMoreCompany(Integer page,Integer rows,Company company){
        return companyService.findMore(page,rows,company);
    }
    //添加公司实现
    @RequestMapping("/insertCompany")
    public Integer insertCompany(Company company){
        return companyService.insertConpany(company);
    }

    //修改公司实现
    @RequestMapping("/changeCompany")
    public  Integer changeCompany(Company company){
        return companyService.ChangeCompany(company);
    }

}
